package com.androway.domains;

import com.google.gson.annotations.Expose;

public abstract class AbstractPersistentObject
{
	@Expose
	protected String	uid;

	public String getUid()
	{
		return this.uid;
	}

	public void setUid(String uid)
	{
		this.uid = uid;
	}

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + ((this.uid == null) ? 0 : this.uid.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (this.getClass() != obj.getClass())
			return false;
		AbstractPersistentObject other = (AbstractPersistentObject) obj;
		if (this.uid == null)
		{
			if (other.uid != null)
				return false;
		}
		else if (!this.uid.equals(other.uid))
			return false;
		return true;
	}
}